/*
 * Copyright 2011 OpenWAF.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.openwaf.client.core;

import com.openwaf.common.annotation.NoJavaScript;

public class JSDate{

  protected JSDate() {
  }

  public static native JSDate create() /*-{
    return new Date();
  }-*/;

  public static native JSDate create(double ms) /*-{
    return new Date(ms);
  }-*/;
  public static native JSDate create(int year, int month) /*-{
    return new Date(year, month);
  }-*/;

  public static native JSDate create(int year, int month, int dayOfMonth) /*-{
    return new Date(year, month, dayOfMonth);
  }-*/;
  public static native JSDate create(int year, int month, int dayOfMonth, int hours) /*-{
    return new Date(year, month, dayOfMonth, hours);
  }-*/;

  public static native JSDate create(int year, int month, int dayOfMonth, int hours,
      int minutes) /*-{
    return new Date(year, month, dayOfMonth, hours, minutes);
  }-*/;

  public static native JSDate create(int year, int month, int dayOfMonth, int hours,
      int minutes, int seconds) /*-{
    return new Date(year, month, dayOfMonth, hours, minutes, seconds);
  }-*/;

  public static native JSDate create(int year, int month, int dayOfMonth, int hours,
      int minutes, int seconds, int millis) /*-{
    return new Date(year, month, dayOfMonth, hours, minutes, seconds, millis);
  }-*/;

  public static native JSDate create(String dateString) /*-{
    return new Date(dateString);
  }-*/;

  public static native double parse(String dateString) /*-{
    return Date.parse(dateString);
  }-*/;

  public static native double UTC(int year, int month, int dayOfMonth, int hours,
      int minutes, int seconds, int millis) /*-{
    return Date.UTC(year, month, dayOfMonth, hours, minutes, seconds, millis);
  }-*/;

  @NoJavaScript
  public final native int getDate(); /*-{
    return this.getDate();
  }-*/


  @NoJavaScript
  public final native int getDay(); /*-{
    return this.getDay();
  }-*/

  @NoJavaScript
  public final native int getFullYear(); /*-{
    return this.getFullYear();
  }-*/

  @NoJavaScript
  public final native int getHours(); /*-{
    return this.getHours();
  }-*/

  @NoJavaScript
  public final native int getMilliseconds(); /*-{
    return this.getMilliseconds();
  }-*/

  @NoJavaScript
  public final native int getMinutes(); /*-{
    return this.getMinutes();
  }-*/

  @NoJavaScript
  public final native int getMonth(); /*-{
    return this.getMonth();
  }-*/

  @NoJavaScript
  public final native int getSeconds(); /*-{
    return this.getSeconds();
  }-*/

  @NoJavaScript
  public final native double getTime(); /*-{
    return this.getTime();
  }-*/
  @NoJavaScript
  public final native int getTimezoneOffset(); /*-{
    return this.getTimezoneOffset();
  }-*/

  @NoJavaScript
  public final native int getUTCDate(); /*-{
    return this.getUTCDate();
  }-*/

  @NoJavaScript
  public final native int getUTCDay(); /*-{
    return this.getUTCDay();
  }-*/

  @NoJavaScript
  public final native int getUTCFullYear(); /*-{
    return this.getUTCFullYear();
  }-*/

  @NoJavaScript
  public final native int getUTCHours(); /*-{
    return this.getUTCHours();
  }-*/

  @NoJavaScript
  public final native int getUTCMilliseconds(); /*-{
    return this.getUTCMilliseconds();
  }-*/

  @NoJavaScript
  public final native int getUTCMinutes(); /*-{
    return this.getUTCMinutes();
  }-*/

  @NoJavaScript
  public final native int getUTCMonth(); /*-{
    return this.getUTCMonth();
  }-*/

  @NoJavaScript
  public final native int getUTCSeconds(); /*-{
    return this.getUTCSeconds();
  }-*/

  @NoJavaScript
  public final native double setDate(int dayOfMonth); /*-{
    return this.setDate(dayOfMonth);
  }-*/

  @NoJavaScript
  public final native double setFullYear(int year); /*-{
    return this.setFullYear(year);
  }-*/

  @NoJavaScript
  public final native double setFullYear(int year, int month); /*-{
    return this.setFullYear(year, month);
  }-*/

  @NoJavaScript
  public final native double setFullYear(int year, int month, int day); /*-{
    return this.setFullYear(year, month, day);
  }-*/


  @NoJavaScript
  public final native double setHours(int hours); /*-{
    return this.setHours(hours);
  }-*/

  @NoJavaScript
  public final native double setHours(int hours, int mins); /*-{
    return this.setHours(hours, mins);
  }-*/

  @NoJavaScript
  public final native double setHours(int hours, int mins, int secs); /*-{
    return this.setHours(hours, mins, secs);
  }-*/

  @NoJavaScript
  public final native double setHours(int hours, int mins, int secs, int ms); /*-{
    return this.setHours(hours, mins, secs, ms);
  }-*/

  @NoJavaScript
  public final native double setMinutes(int minutes); /*-{
    return this.setMinutes(minutes);
  }-*/

  @NoJavaScript
  public final native double setMinutes(int minutes, int seconds); /*-{
    return this.setMinutes(minutes, seconds);
  }-*/

  @NoJavaScript
  public final native double setMinutes(int minutes, int seconds, int millis); /*-{
    return this.setMinutes(minutes, seconds, millis);
  }-*/

  @NoJavaScript
  public final native double setMonth(int month); /*-{
    return this.setMonth(month);
  }-*/

  @NoJavaScript
  public final native double setMonth(int month, int dayOfMonth); /*-{
    return this.setMonth(month, dayOfMonth);
  }-*/

  @NoJavaScript
  public final native double setSeconds(int seconds); /*-{
    return this.setSeconds(seconds);
  }-*/

  @NoJavaScript
  public final native double setSeconds(int seconds, int millis); /*-{
    return this.setSeconds(seconds, millis);
  }-*/

  @NoJavaScript
  public final native double setTime(double milliseconds); /*-{
    return this.setTime(milliseconds);
  }-*/;

  @NoJavaScript
  public final native double setUTCDate(int dayOfMonth); /*-{
    return this.setUTCDate(dayOfMonth);
  }-*/

  @NoJavaScript
  public final native double setUTCFullYear(int year); /*-{
    return this.setUTCFullYear(year);
  }-*/

  @NoJavaScript
  public final native double setUTCFullYear(int year, int month); /*-{
    return this.setUTCFullYear(year, month);
  }-*/

  @NoJavaScript
  public final native double setUTCFullYear(int year, int month, int day); /*-{
    return this.setUTCFullYear(year, month, day);
  }-*/

  @NoJavaScript
  public final native double setUTCHours(int hours); /*-{
    return this.setUTCHours(hours);
  }-*/

  @NoJavaScript
  public final native double setUTCHours(int hours, int mins); /*-{
    return this.setUTCHours(hours, mins);
  }-*/

  @NoJavaScript
  public final native double setUTCHours(int hours, int mins, int secs); /*-{
    return this.setUTCHours(hours, mins, secs);
  }-*/

  @NoJavaScript
  public final native double setUTCHours(int hours, int mins, int secs, int ms); /*-{
    return this.setUTCHours(hours, mins, secs, ms);
  }-*/

  @NoJavaScript
  public final native double setUTCMinutes(int minutes); /*-{
    return this.setUTCMinutes(minutes);
  }-*/

  @NoJavaScript
  public final native double setUTCMinutes(int minutes, int seconds); /*-{
    return this.setUTCMinutes(minutes, seconds);
  }-*/

  @NoJavaScript
  public final native double setUTCMinutes(int minutes, int seconds, int millis); /*-{
    return this.setUTCMinutes(minutes, seconds, millis);
  }-*/

  @NoJavaScript
  public final native double setUTCMonth(int month); /*-{
    return this.setUTCMonth(month);
  }-*/

  @NoJavaScript
  public final native double setUTCMonth(int month, int dayOfMonth); /*-{
    return this.setUTCMonth(month, dayOfMonth);
  }-*/

  @NoJavaScript
  public final native double setUTCSeconds(int seconds); /*-{
    return this.setUTCSeconds(seconds);
  }-*/

  @NoJavaScript
  public final native double setUTCSeconds(int seconds, int millis); /*-{
    return this.setUTCSeconds(seconds, millis);
  }-*/

  
  @NoJavaScript
  public final native String toDateString(); /*-{
    return this.toDateString();
  }-*/

  
  @NoJavaScript
  public final native String toLocaleDateString(); /*-{
    return this.toLocaleDateString();
  }-*/

  @NoJavaScript
  public final native String toLocaleString(); /*-{
    return this.toLocaleString();
  }-*/

  @NoJavaScript
  public final native String toLocaleTimeString(); /*-{
    return this.toLocaleTimeString();
  }-*/

  @NoJavaScript
  public final native String toTimeString(); /*-{
    return this.toTimeString();
  }-*/

  @NoJavaScript
  public final native String toUTCString(); /*-{
    return this.toUTCString();
  }-*/

  @NoJavaScript
  public final native double valueOf(); /*-{
    return this.valueOf();
  }-*/

}